import request from '@/utils/request'

/*
*获取农户列表
* */
export function getFarmerList(query) {
  return request({
    url: '/farmer/farmerFarmer/list',
    method: 'get',
    params: query
  })
}

/*
*获取所有农户地块
* */
export function getAllPlot(query) {
  return request({
    url: '/farmer/farmerFarmer/getAllPlot',
    method: 'get',
    params: query
  })
}

/*
*添加农户
* */
export function addFarmer(query) {
  return request({
    url: '/farmer/farmerFarmer/add',
    method: 'post',
    data: query
  })
}

/*
*修改农户
* */
export function updateFarmer(query) {
  return request({
    url: '/farmer/farmerFarmer/update',
    method: 'put',
    data: query
  })
}


/*
*删除农户
* */
export function delFarmer(query) {
  return request({
    url: '/farmer/farmerFarmer/delete',
    method: 'delete',
    params: query
  })
}

/*
*获取农户详情
* */
export function getFarmerInfo(query) {
  return request({
    url: '/farmer/farmerFarmer/getInfo',
    method: 'get',
    params: query
  })
}
